{template 'common/header'}
<div class="main">
	<ul class="nav nav-tabs">

	    <li class="active"><a  href="#">霸屏设置</a></li>
	</ul>

	<div class="panel panel-default">
		<div class="panel-body">
		<form action="" method="post" class=" form" enctype="multipart/form-data">
			<input type="hidden" name="bpid" value="{$bp['id']}" />
			<input type="hidden" name="vedioid" value="{$video['id']}" />
			<input type="hidden" name="fhbid" value="{$fanshb['id']}" />
			<input type="hidden" name="id" value="{$reply['id']}" />
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">手机端标题</label>
				<div class="col-sm-9 col-xs-12">
					<input type="text" name="big_mobtitle" class="form-control" value="{$fanshb['big_mobtitle']}">
					<div class="help-block">显示在手机端页面标题</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">手机端滚动标题</label>
				<div class="col-sm-9 col-xs-12">
					<input type="text" name="mobtitle" class="form-control" value="{$reply['mobtitle']}">
					<div class="help-block">显示在手机端页面滚动标题</div>
				</div>
			</div>
			<div class="form-group" style="display: block">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">小图标位置</label>
				<div class="col-sm-9">
					<label class="radio-inline">
						<input type="radio" name="ishb" value="0" {if $bp['ishb']==0} checked="checked"{/if}/>左边
					</label>
					<label class="radio-inline">
						<input type="radio" name="ishb" value="1" {if $bp['ishb']==1} checked="checked"{/if}/>右边
					</label>
					<div class="help-block">默认左边。</div>
				</div>
			</div>
			<div class="form-group">
				<label for="start_picurl" class="control-label col-xs-12 col-sm-3 col-md-2">大屏幕背景设置</label>
				<div class="col-sm-9 col-xs-12">
					{php echo tpl_form_field_image('bp_bg', $bp['bp_bg']);}
					<div class="help-block">不上传使用默认背景，尺寸为：1440*900</div>
				</div>
			</div>
			<div class="form-group">
				<label for="start_picurl2" class="control-label col-xs-12 col-sm-3 col-md-2">霸屏页面轮播默认图</label>
				<div class="col-sm-9 col-xs-12">
					{php echo tpl_form_field_image('bp_carousel_bg', $bp['bp_carousel_bg']);}
					<div class="help-block">不上传使用默认图，尺寸为：380*540</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">视频背景</label>
				<div class="col-sm-9 col-xs-12">
					{if IMS_VERSION >= 0.8}
					{php echo tpl_form_field_video('vodio_bg11', $video['vodio_bg11']);}
					<div class="help-block">视频背景mp4格式，控制在3M以内，背景视频只能播放背景效果，无法播放声音</div>
					{else}
					<input type="text" class="form-control" name="vodio_bg11" value="{$video['vodio_bg11']}">
					<div class="help-block">由于微屏互动0.8以下版本无法上传视频，所以，请直接通过FTP把视频传到服务器，再把文件名填入这边，视频背景mp4格式，控制在3M以内，背景视频只能播放背景效果，无法播放声音</div>
					{/if}
				</div>
			</div>
			<div class="form-group">
				<label for="tptop_url" class="control-label col-xs-12 col-sm-3 col-md-2">标题</label>
				<div class="col-sm-9 col-xs-12">
					<input type="text" id="bp_title" class="form-control" placeholder="" name="bp_title" value="{$bp['bp_title']}">
					<div class="help-block">大屏幕显示标题</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">背景音乐<br>mp3格式</label>
				<div class="col-sm-9 col-xs-12">
					{php echo tpl_form_field_audio('bp_music',$bp['bp_music']);}
					<div class="help-block">现场活动背景音乐，不上传则不使用背景音乐</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">霸屏音乐<br>mp3格式</label>
				<div class="col-sm-9 col-xs-12">
					{php echo tpl_form_field_audio('bp_voice',$bp['bp_voice']);}
					<div class="help-block">霸屏时候的音乐，不上传则使用默认音乐</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">大屏幕霸屏的样式</label>
				<div class="col-sm-9">
					<label class="radio-inline">
						<input type="radio" name="bp_type" value="0" {if $fanshb['bp_type']==0} checked="checked"{/if}/>默认
					</label>
					<label class="radio-inline">
						<input type="radio" name="bp_type" value="1" {if $fanshb['bp_type']==1} checked="checked"{/if}/>新样式
					</label>
					<label class="radio-inline">
						<input type="radio" name="bp_type" value="2" {if $fanshb['bp_type']==2} checked="checked"{/if}/>弹幕式
					</label>
					<div class="help-block">新样式：在默认的基础上，增加横图横屏显示。弹幕式：普通消息显示方式为弹幕。<span style="color: red"></span></div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">霸屏背景颜色</label>
				<div class="col-sm-9 col-xs-12">
					{php echo tpl_form_field_color('bb_bgcoclor',$fanshb['bb_bgcoclor']);}
					<div class="help-block">用来控底部导航的背景色调，不设置使用默认的</div>
				</div>
			</div>
			<div class="form-group">
				<label for="opacity" class="control-label col-xs-12 col-sm-3 col-md-2">霸屏背景颜色透明度(霸屏背景视频图片样式)</label>
				<div class="col-sm-9 col-xs-12">
					<input type="text" id="bp_opacity" class="form-control" placeholder="" name="bp_opacity" value="{$fanshb['bp_opacity']}">
					<div class="help-block">霸屏背景颜色透明度，0-1之间，1，表示不透明。(新模式霸屏下，0表示使用图片背景，1表示视频背景)</div>
				</div>
			</div>
			<div class="form-group">
				<label class="col-xs-12 col-sm-3 col-md-2 control-label">大屏幕右边显示图片或者榜单</label>
				<div class="col-sm-9">
					<label class="radio-inline">
						<input type="radio" name="isbd" value="0" {if $bp['isbd']==0} checked="checked"{/if}/>图片
					</label>
					<label class="radio-inline">
						<input type="radio" name="isbd" value="1" {if $bp['isbd']==1} checked="checked"{/if}/>榜单
					</label>
					<div class="help-block">默认图片。<span style="color: red"></span></div>
				</div>
			</div>
			<div class="form-group">
				<label class="control-label col-xs-12 col-sm-3 col-md-2"><span style='color:red'>*</span> 何时的榜单</label>
				<div class="col-sm-9">
					<label class="radio-inline">
						<input type="radio" name="bp_maxnum" value="0" onclick="$('#w_time').hide()" {if $bp['bp_maxnum']==0} checked="checked"{/if}/>12小时内
					</label>
					<label class="radio-inline" >
						<input type="radio" name="bp_maxnum" value="1" onclick="$('#w_time').show()" {if $bp['bp_maxnum']==1} checked="checked"{/if}/>自定义
					</label>
					<div class="help-block">默认12小时内。<span style="color: red"></span></div>
					<div class="col-sm-9" id ="w_time" {if $bp['bp_maxnum']==1} style="display: block"{else}style="display: none"{/if}>
					{php echo tpl_form_field_daterange('bd_times', array('start'=>date('Y-m-d H:i',$bp['bd_starttime']),'end'=>date('Y-m-d H:i',$bp['bd_endtime'])), true)}
				</div>
			</div>

		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">大屏幕是否显示底部跑马灯</label>
			<div class="col-sm-9">
				<label class="radio-inline">
					<input type="radio" name="ispmd" value="0" {if $bp['ispmd']==0} checked="checked"{/if}/>显示
				</label>
				<label class="radio-inline">
					<input type="radio" name="ispmd" value="1" {if $bp['ispmd']==1} checked="checked"{/if}/>不显示
				</label>
				<div class="help-block">默认显示。新聊天模式下暂时无效<span style="color: red"></span></div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">聊天界面是否允许普通聊天</label>
			<div class="col-sm-9">
				<label class="radio-inline">
					<input type="radio" name="is_messages" value="0" {if $fanshb['is_messages']==0} checked="checked"{/if}/>允许
				</label>
				<label class="radio-inline">
					<input type="radio" name="is_messages" value="1" {if $fanshb['is_messages']==1} checked="checked"{/if}/>不允许
				</label>
				<div class="help-block">默认允许。不允许：聊天界面底部的输入窗口将不显示<span style="color: red"></span></div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">大屏幕是否显示普通消息</label>
			<div class="col-sm-9">
				<label class="radio-inline">
					<input type="radio" name="is_show_screen" value="0" {if $fanshb['is_show_screen']==0} checked="checked"{/if}/>允许
				</label>
				<label class="radio-inline">
					<input type="radio" name="is_show_screen" value="1" {if $fanshb['is_show_screen']==1} checked="checked"{/if}/>不允许
				</label>
				<div class="help-block">默认显示。如选择不显示，大屏幕上将不会显示普通聊天消息，手机端不影响</div>
			</div>
		</div>
		<div class="form-group">
			<label class="col-xs-12 col-sm-3 col-md-2 control-label">普通消息发送间隔</label>
			<div class="col-sm-9 col-xs-6">
				<div class="input-group">
					<input type="number" class="form-control" name="messagesinterval" value="{$fanshb['messagesinterval']}"/>
					<span class="input-group-addon">秒</span>
				</div>
				<div class="help-block"> 0 为不限制，默认为0，请根据需要设置<span style="color: #FF0000">设置后需要在设置的时间后才可以发下一条普通消息，普通图片也适用。</span></div>
			</div>
		</div>
		<div class="form-group">
			<label for="bp_keyword" class="control-label col-xs-12 col-sm-3 col-md-2">消息禁止关键词</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="bp_keyword" class="form-control" placeholder="" name="bp_keyword" value="{$bp['bp_keyword']}">
				<div class="help-block">手机聊天界面，禁止发布的文字。多个请用英文逗号隔开。这样：我爱你,我恨你</div>
			</div>
		</div>
		<div class="form-group">
			<label for="bp_listword" class="control-label col-xs-12 col-sm-3 col-md-2">消息屏蔽关键词</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="bp_listword" class="form-control" placeholder="" name="bp_listword" value="{$bp['bp_listword']}">
				<div class="help-block">手机聊天界面，屏蔽文字，用*号代替。多个请用英文逗号隔开。这样：爱,恨,情,仇</div>
			</div>
		</div>
		<div class="form-group">
			<label for="bp_listword" class="control-label col-xs-12 col-sm-3 col-md-2">色情图片检测appcode</label>
			<div class="col-sm-9 col-xs-12">
				<input type="text" id="appcode" class="form-control" placeholder="" name="appcode" value="{$bp['appcode']}">
				<div class="help-block">不填写不开启，默认不开启。开启后，检测到用户发送色情图片将进行拦截。须先在阿里云后台开通功能，<a href="https://market.aliyun.com/products/57124001/cmapi020047.html?spm=5176.730005.0.0.IlauJv" target="_blank">开通地址</a></div>
			</div>
		</div>
		<div class="form-group">
			<label for="start_picurl" class="control-label col-xs-12 col-sm-3 col-md-2">聊天顶部banner(新模式下可以上传未关注二维码)</label>
			<div class="col-sm-9 col-xs-12">
				{php echo tpl_form_field_image('top_bg', $fanshb['top_bg']);}
				<div class="help-block">不上传使用默认背景，尺寸为：750*120</div>
			</div>
		</div>
		<div class="form-group">
			<label for="start_picurl" class="control-label col-xs-12 col-sm-3 col-md-2">logo或新聊天背景</label>
			<div class="col-sm-9 col-xs-12">
				{php echo tpl_form_field_image('bp_logo', $fanshb['bp_logo']);}
				<div class="help-block">logo尺寸为：120*120(不上传不使用),新聊天背景尺寸：750*1334(不上传用默认)</div>
			</div>
		</div>
			<div class="form-group col-sm-12">
            <input type="submit" name="submit" value="提交" class="btn btn-primary col-lg-1" />
            <input type="hidden" name="op" value="addad" />
        	</div>
		</div>
	</div>
	</form>

</div>
<!-- <div id="queding" class="hide">
	<span class="pull-right btn btn-primary" id="chengaddd" onclick="abc()">确定</span>
</div> -->
<script>
	require(['bootstrap'],function($){
		$('.btn').hover(function(){
			$(this).tooltip('show');
		},function(){
			$(this).tooltip('hide');
		});
	});


$(function(){

    $(".check_all").click(function(){
       var checked = $(this).get(0).checked;

       $("input[type=checkbox]").attr("checked",checked);
    });
	$("input[name=deleteall]").click(function(){
		var check = $("input:checked");

		if(check.length<2){
			alert('请选择要删除的记录!');
			return false;
		}
        if( confirm("确认要删除选择的记录?")){
		var id = new Array();
		check.each(function(i){
			id[i] = $(this).val();
		});
		$.post('{php echo $this->createWebUrl('deleteAllcard')}', {idArr:id},function(data){
			if (data.errno ==0)
			{
				location.reload();
			} else {
				alert(data.error);
			}


		},'json');
		}

	});
});
</script>
<script>
function drop_confirm(msg, url){
    if(confirm(msg)){
        window.location = url;
    }
}
</script>
{template 'common/footer'}